function save_outputs(Xmean,ns_time,data_name,folder_name)

% 1. hip position 
hip_pos = Xmean.x_meanHP';%-x_meanHP(1);
save([folder_name '/' data_name '_hippos.mat'],'hip_pos','ns_time');

% 2. Linearized hip position 
Linear_hippos = Xmean.x_meanHPL';
save([folder_name '/' data_name '_LinearHippos.mat'],'Linear_hippos','ns_time');

% 3. non-stance slope
ns_slope = Xmean.x_meanNSL';
save([folder_name '/' data_name '_nsslope.mat'],'ns_slope','ns_time');

% 4. linearized non-stance slope
Linear_nsslope = Xmean.x_meanLNS';
save([folder_name '/' data_name '_LinearNSslope.mat'],'Linear_nsslope','ns_time');


% 5. stance COM slope
st_COM = Xmean.x_meanSCOM';
save([folder_name '/' data_name '_stCOM.mat'],'st_COM','ns_time');

% 6. linearized COM slope
Linear_stCOM = Xmean.x_meanSCOML';
save([folder_name '/' data_name '_LinearSTcom.mat'],'Linear_stCOM','ns_time');

% 7. non-stance COM slope
ns_COM = Xmean.x_meanNSCOM';
save([folder_name '/' data_name '_nsCOM.mat'],'ns_COM','ns_time');


% 8. linearized non-stance COM slope
Linear_nsCOM = Xmean.x_meanNSCOM';
save([folder_name '/' data_name '_LinearNSCOM.mat'],'Linear_nsCOM','ns_time');

% % % 5. stance torso slope
% % s_torso = Xmean.x_meanST';
% % save([folder_name '/' data_name '_storso.mat'],'s_torso','ns_time');
% % 
% % % 6. linearized stance torso slope
% % Linear_s_torso = Xmean.x_meanLST';
% % save([folder_name '/' data_name '_LinearStorso.mat'],'Linear_s_torso','ns_time');
% % 
% % % 7. non-stance torso slope
% % ns_torso=Xmean.x_meanNST';
% % save([folder_name '/' data_name '_nstorso.mat'],'ns_torso','ns_time');
% % 
% % % 8. linearized non-stance torso slope
% % Linear_ns_torso = Xmean.x_meanLNST';
% % save([folder_name '/' data_name '_LinearNStorso.mat'],'Linear_ns_torso','ns_time');
% % 
% % % 9. COM
% % com=Xmean.x_meanCOM';
% % save([folder_name '/' data_name '_com.mat'],'com','ns_time');
% % 
% % % 10. linearized non-stance torso slope
% % Linear_com = Xmean.x_meanLCOM';
% % save([folder_name '/' data_name '_LinearCOM.mat'],'Linear_com','ns_time');


end